﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="using:InfoHub.Styles">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Shared.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <DataTemplate x:Name="YouTubeTemplateNormal">
        <Grid Width="{Binding ColSpan}"
              Height="{Binding RowSpan}" Background="{StaticResource PrimaryBrush}">
            <Image VerticalAlignment="Top"
                   Source="{Binding Image}"
                   Stretch="UniformToFill" />
            <TextBlock FontSize="35" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="30,20" FontFamily="Segoe UI Symbol"></TextBlock>
            <StackPanel VerticalAlignment="Bottom">
                <Grid Background="{StaticResource PrimaryBrush}" Opacity="0.9">
                    <TextBlock Margin="10,20"
                               FontSize="20"
                               Foreground="{StaticResource PrimaryContrastBrush}"
                               TextTrimming="WordEllipsis"
                               TextWrapping="Wrap">
                        <Run Text="{Binding Date, Converter={StaticResource DateStringConverter}, ConverterParameter='ddd. MMM d'}" />
                        | <Run Text="{Binding Title}" />
                    </TextBlock>
                </Grid>
            </StackPanel>
        </Grid>
    </DataTemplate>

    <DataTemplate x:Name="YouTubeTemplateHero">
        <Grid Width="500"
              Height="500" Background="{StaticResource PrimaryBrush}">
            <Image VerticalAlignment="Top"
                   Source="{Binding Image}"
                   Stretch="UniformToFill" />
            <TextBlock FontSize="35" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="30,20" FontFamily="Segoe UI Symbol"></TextBlock>
            <StackPanel VerticalAlignment="Bottom" Width="400" Margin="0,0,0,20" HorizontalAlignment="Left">
                <Border Background="Black" BorderBrush="{StaticResource PrimaryContrastBrush}" BorderThickness="0,5,5,5">
                    <Grid Background="{StaticResource PrimaryBrush}" Opacity="0.9">
                        <TextBlock Margin="20"
                               FontSize="25"
                               Foreground="{StaticResource PrimaryContrastBrush}"
                               TextTrimming="WordEllipsis"
                               TextWrapping="Wrap">
                        <Run Text="{Binding Date, Converter={StaticResource DateStringConverter}, ConverterParameter='ddd. MMM d'}" />
                        | <Run Text="{Binding Title}" />
                        </TextBlock>
                    </Grid>
                </Border>
            </StackPanel>
        </Grid>
    </DataTemplate>

</ResourceDictionary>
